As discussed in U.S. Pat. No. 5,457,797 entitled "Flexible Multi-Platform Partitioning for Computer Applications" of Forte Software Inc., the dual trends in computer development of placing increasingly powerful processors in workstations in personal computers (PC's), coupled with rapidly improving connectivity has permitted the development of distributed applications.
Distributed applications refers to the paradigm in which software elements that must cooperate to fulfill the purpose of an application or complete a transaction, are spread over multiple parallel processors. One advantage of this is that applications requiring substantial support from other applications can be run over a network of linked workstations or PC's, each with modest memory and processing capacity, rather then requiring a very large computer to run the application and all of its dependencies.
Another advantage of distributing large and complex applications is that each distributed part of the application is separately compiled, and can be updated and recompiled without having to recompile the entire application.
In response to the trend toward the use of distributed systems, technologies have evolved to provide a procedural base for the smooth interaction of the multiple hardware components that can form the system.
For example, Distributed Computing Environment.RTM. (DCE) of the Open Software Foundation is one recently evolved technology that permits applications distributed over a number of different processors or systems to communicate and interact effectively in order to share software resources. DCE utilizes an interfacing mechanism known as the remote procedure call (RPC), to transparently handle the details of communications (such as different data formats, security, etc.) between systems. Using RPCs, a client computer can access and use application software located not only on parallel processors, but also on processors located on different platforms, in a heterogeneous network.
The Object Management Group (OMG) evolves the RPC oriented distribution mechanisms to the world of objects with its Common Object Request Broker Architecture (CORBA). Object method calls are transparently directed from the client object to the server object through the object request broker implementations on the respective systems. A complementary set of distributed object services, defined by OMG, handles the creation, destruction and other object lifecycle services across the different execution platforms, as well as aspects of distribution such as naming, persistence, event handling, security and more.
This is the type of technology available to permit an application to be created with components spread over multiple processors, to effectively utilize the hardware resources of an entire network to run the large application.
The usual approach to creating distributed applications requires the original software developer to consider the details of distribution before developing the body of the application. This is quite complicated, since it involves ascertaining, in advance which functions will be most frequently called and should therefore reside on the same processor or local node, so that the number of messages sent over the network is minimized and response times in complex workloads is decreased.
In the case of object oriented applications, the functions are involved through calls to a class constructed on the processor memory stack. Using the traditional approach, then, the developer must take the following steps in addition to building the standalone application;
1. Determine which class interfaces within the application are to be distributed; PA1 2. Determine and set the middleware characteristics for each distributed interface; PA1 3. Split the application into multiple executables, each communicating using the distributed interfaces. PA1 1. An application partitioning tool; and PA1 2. A code generator.
One simpler way of determining which objects are to be distributed is to analyze the application for static links between objects. Where there are few links, a logical distribution point may exist. However, this is not the optimal way to determine split points. Typically, the split point would be decided based on the traffic across the interface for a given workload, those interactions with low flow are potential split points. Other considerations are data placement considerations, security and application management. Therefore, one problem for the application developer is correctly determining these split points within the application to maximize processing effectiveness while keeping response time to a minimum.
A problem for the application developer in connection with determining and setting the middleware characteristics for each distributed application is the complexity of determining the correct settings and reflecting them in the application. For each distributed interface, the developer must code appropriate files containing middleware settings and middleware startup commands. These may be imbedded in application code or provided as a set of configuration files. For the case of some middlewares, such as DCE, an interface definition (.idl) file must be provided.
The developer may have to contend with settings that differ across the application. For example, an application may be a DCE application using application level protection across it, but one interface may require session level protection. Setting this correctly may be difficult.
Another problem for the developer using the traditional approach in creating distributed applications is the complexity and error prone nature of actually splitting the application. Once the distributed classes have been identified, the existing application has to be split up into modules that can execute in different processes on, in most cases, different machines. The developer has to physically split up the code into multiple build environments and deploy the components across the different systems. The major problem with this is ensuring that all of the required interfaces have been written. However, viewing only code listings makes it very difficult for the programmer to locate all of the split points to do this.
The three problems identified above with developing object oriented distributed applications are solved by providing a technique which infers distribution characteristics of the application through visual interaction with the developer. This has been implemented in the present invention in a toolset consisting of:
Partitioning is defined for the purposes of this invention as the technique of dividing a monolithic or standalone application into multiple interconnected components. Each component is called a partition. Dividing an application into partitions is called partitioning.
Accordingly, the present invention provides a method for creating a distributed application for an object oriented environment. The method consists of the following computer implemented steps. An application layout is displayed in a visual environment illustrating program object parts and connections between the objects. An internal representation of the displayed application is defined and, in response to user action displaying at least one partition boundary, the partition boundary is defined in the internal representation. In response to user action relocating at least one program object on the displayed application so that its connection with other program objects cross said at least one partition boundary, these connections are defined as distributed connections in the internal representation. From the distributed connections, server objects and client objects are determined, and in response to a user commit action, server code structure with a distributed interface for each server part is generated and a client stub with the distributed interface for every client part corresponding to each server part is generated.
Preferably, the method further consists in receiving middleware characteristics for the server part and including those characteristics in the distributed interface generated for the server code structure and the client stub.
The invention also provides a method for creating a distributed application for an object oriented environment having a visual building component adapted to display an application design input by a user, the displayed application design having multiple program objects and connections between said objects representing method calls. The method consists of the computer implemented steps of initially defining an internal representation of the objects and connections of the displayed application design. In response to user definition of at least one partition boundary in the displayed application design, corresponding empty partition containers are defined in the internal representation. In response to user relocation of at least one program object across the at least one partition boundary in the displayed application design, the program object is redefined in the internal representation as a distributed object and its connections crossing said at least one partition boundary as distributed connections. In response to a user commit action, code is generated that includes middleware characteristics for every distributed connection defined in the internal representation.
The present invention is also directed to a software development tool for designing and coding a distributed application that is adaptable to interoperate with a visual building component for displaying an application as multiple program objects having connections between them representing method calls, for displaying discrete partitions having boundaries, and for permitting a user to relocate program objects across partition boundaries while maintaining the visual representation of connections between the objects. The tool includes a metadata generator for defining a current internal representation of the displayed application and for defining any connections crossing partition boundaries in the displayed application as distributed connections in the current internal representation, and a code generator for generating distributed interfaces for all distributed connections defined in the current internal representation. The code generator is activated by user action.
In addition, the invention is directed to a computer program product that comprises computer usable medium having new, useful and nonobvious combination of "computer readable program code means" embodied therein for creating a distributed application for an object oriented environment having a visual building component adapted to display an application design input by a user where the displayed application design has multiple program objects and connections between said objects representing method calls. The computer readable program code means in the computer program product consists of computer readable program code means for causing the computer to initially define an internal representation of the objects and connections of the displayed application design, and computer readable program code means for causing the computer, in response to user definition of at least one partition boundary in the displayed application design, to define corresponding empty partition containers in the internal representation. The computer readable program product also includes computer readable program code means for causing the computer, in response to user relocation of at least one program object across said at least one partition boundary in the displayed application design, to redefine said at least one program object in the internal representation as a distributed object and its connections crossing said at least one partition boundary as distributed connections. The computer readable program product includes, in addition, computer readable program code means for causing the computer, in response to a user commit action, to generate code including middleware characteristics for every distributed connection defined in the internal representation.